package com.css.fxfzdzzh.modules.sandLiquefaction.service;

import com.alibaba.fastjson.JSONObject;
import com.css.fxfzdzzh.base.response.RestResponse;
import com.css.fxfzdzzh.modules.eqLandslide.count.param.TaskModelParam;
import com.css.fxfzdzzh.modules.sandLiquefaction.entity.Ahp;
import com.css.fxfzdzzh.modules.sandLiquefaction.entity.DzzhResultDetailSandLiquefaction;
import com.css.fxfzdzzh.modules.sandLiquefaction.entity.DzzhResultSandLiquefaction;
import com.css.fxfzdzzh.modules.sandLiquefaction.param.EvaluateParam;
import com.css.fxfzdzzh.modules.sandLiquefaction.vo.DzzhModelAhpVO;
import com.css.fxfzdzzh.modules.sandLiquefaction.vo.DzzhModelResultVO;
import com.css.fxfzdzzh.modules.sandLiquefaction.vo.DzzhResultSandLiquefactionVO;
import com.css.fxfzdzzh.modules.sandLiquefaction.vo.SandPolygonEvaluateResultVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * @author Dbj
 * @date 2023年03月11日  11:10
 */
public interface SandLiquefactionService {
    Map<String, Object> getModelSandLiquefaction(TaskModelParam param, int curPage, int pageSize);

    DzzhModelResultVO getFinalResult(String taskId,String algorithmType) throws IllegalAccessException;

    void saveToCenterResult(String taskId,String algorithmType);

    void delResult(String dmslId);

    void replaceToFinalResult(String dmslId, String flag, String taskId);

    RestResponse chooseDrillData(String versionCode, String taskId);

    String evaluate(EvaluateParam param) throws ExecutionException, InterruptedException;

    void evaluate1(Ahp ahp) throws Exception;

    RestResponse importDrillData(String taskId, String versionCode, MultipartFile file, HttpServletResponse response) throws Exception;

    void test() throws IllegalAccessException;

    DzzhModelAhpVO getAhpFinalResult(String taskId) throws IllegalAccessException;

    List<DzzhResultDetailSandLiquefaction> details(String dmslId, BigDecimal earthquakeAcceleration, String groundWaterDepth);

    void export(String dmslId, Double earthquakeAcceleration, Double groundWaterDepth,String flag,HttpServletResponse response);

    List<DzzhResultSandLiquefactionVO> getEvaluateResult(String dmslId,String taskDistrict,String taskId);

    Map<String, Object> getCenterDataPage(String taskId, int curPage, int pageSize);

    void changeModel(String dmslId, String taskId, String flag);

    void savePolygonEvaluateResult(List<SandPolygonEvaluateResultVO> voList);

    void calculateOmprehensiveTerrainIndex(String teraVersion, String taskId,Map<String,Object> map,String gcFileName,String dmslId) throws Exception;

    void calculateSite(String teraVersion,String taskId,Map<String,Object> map,String gcFileName,String dmslId) throws Exception;

    //按省统计危险性面积（【砂土液化-层次分析法】分析评估结果）
    RestResponse countResultAreaByProvince(String taskId);
    //按市统计危险性面积（【砂土液化-层次分析法】分析评估结果）
    RestResponse countResultAreaByCity(String taskId);

    String getMapResultFile(String taskId, String type,String dmslId);

    String getFinalMapResultFile(String taskId, String dmslId, String landform, String pga);

    String  handleRiver(Ahp ahp) throws Exception;

    void deleteCountBuffer();

    DzzhModelResultVO getCenterResult(String taskId, String algorithmType, String dmslId) throws IllegalAccessException;

    RestResponse countResultAreaByCounty(String taskId);
}
